#pragma warning(disable:4996)
#include<stdio.h>
#include<assert.h>
char* My_Strncpy(char* parr1, const char* parr2, size_t count)
{
    assert(parr1 && parr2);
    char* ret = parr1;
    while (count && (*parr1++ = *parr2++))
    {
        count--;
    }
    if (count)
    {
        while (--count)
        {
            *parr1++ = '\0';
        }
    }
    *parr1 = '\0';
    return ret;
}
int main()
{
    char arr1[] = "abcdef";
    char arr2[] = "bit";
    int count;
    scanf("%d", &count);
    My_Strncpy(arr1, arr2, count);
    printf("%s\n", arr1);
    return 0;
}
